<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta charset="utf-8">
    <title>主页</title>
    <style>
        .sup{
           font-size:50px;
           border:1px dashed red;
        }

        .infer{
            font-size:10px;
            border: 1px dotted green;
        }


        .title{
            text-align:center;
            margin:10px auto;
        }


		.info2{
			font-size:15px;
			text-align:left;

			width:500px;
			margin:0 auto;

			padding:10px 50px;

			border:5px double grey;

			//zoom:150%;
		}


		.button-div{
			font-size:20px;
			text-align:right;

			width:600px;
			margin:0 auto;

			//border: 2px dotted black;
		}

		.button{
			font-size:20px;
			background-color:yellow;
			border:1px solid black;
		}

	</style>
</head>


<body>

<h1 class="title">欢迎来到好友推荐系统</h1>




<!-- 推荐好友列表 -->
<div class="info2">
    <ol>
        {% for friend in friends %}
        <li>
            <a href='http://www.baidu.com'>{{friend['_id']}}</a>&nbsp;&nbsp;
            <form style="display:inline" action="/response" method="post">
                <button name='good' type="submit">好</button>
                &nbsp;
                <button name='normal' type="submit">一般</button>
                &nbsp;
                <button name='bad' type="submit">差</button>
            </form>
            <div>
                &nbsp;ta的兴趣爱好:&nbsp;
                {% for hby in friend['hobby'] %}
                    {% if hby == 1 %}
                        {{all_hobby[loop.index0]}} &nbsp;
                    {% endif %}
                {% endfor %}
            </div>
        </li>
        <br/>
        {% endfor %}
    </ol>
</div>




{% for i in range(2) %}
<br/>
{% endfor %}


<!-- 注册 登陆 -->
{% if username == '' %}
<div class="button-div">
<form style="display:inline" action="/signup" method="get">
    <button class="button" type='submit'>注册</button>
</form>

&nbsp;

<form style='display:inline' action="/login" method="get">
    <button class='button' type='submit'>登录</button>
</form>
</div>
{% else %}

<div class="button-div">
<p>你的用户名是:{{username}}</p>
<form action="/logout" method="get">
    <button class='button' type="submit">退出登录</button>
</form>
</div>
{% endif %}


</body>
</html>